package org.ycx.upms.dao.mapper;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.context.annotation.Primary;
import org.ycx.upms.dao.auto.SecRolePermissionMapper;

import java.util.List;

/**
* SecRolePermission 自定义Mapper
* Created by yang on 2017/6/26.
*/
@Primary
public interface ISecRolePermissionMapper extends SecRolePermissionMapper {

    @Select("select ROLE_ID from sec_role_permission where PERMISSION_ID=#{id}")
    List<String> selectByPermissionId(@Param("id") Integer value);

    @Select ("select rid from sec_role")
    List<Integer> selectAllRoles();
}